<?php


  require('includes/application_top.php');

  $country = $_POST['id'];


$zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int)$country . "' order by zone_name");
        while ($zones_values = tep_db_fetch_array($zones_query)) {
          $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
        }

	if(count($zones_array)){
        echo tep_draw_pull_down_menu('state', $zones_array);

    } else {
      echo tep_draw_input_field('state');
    }

  ?>